Agreement Management Biz API

(0 reviews)

Update Consents TMF 651 PATCH

Update Customer accepted Consents to Salesforce.

URL
https://[localhost]:[port]/tmf-api/agreementManagement/v4/{businessId}/agreement
url Param
nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (PR, BB, JM, PA, etc.) identifying the business unit.Y
nametypedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API requestN
cURL request
curl --location --request PATCH 'https://nonprod.esb.cloud.lla.com/dev/agreement-management-biz/tmf-api/agreementManagement/v4/PR/agreement' \
--header 'X-Correlation-ID: 7263548193745' \
--header 'client_id: 12345' \
--header 'client_secret: abcde' \
--header 'Content-Type: application/json' \
--data '[
    {
        "op": "replace",
        "path": "/agreement?agreementItem.productOffering.name=OrderId&agreementItem.productOffering.id=801do00000KlaR7AAJ&engagedParty.name=Digital&engagedParty.role=channel",
        "value": [
            {
                "id": "MktPrefPostal",
                "version": "2",
                "agreementType": "MktPrefPostal",
                "name": "MktPrefPostal",
                "characteristic": [
                    {
                        "name": "mandatory",
                        "value": true/false
                    },
                    {
                        "name": "language",
                        "valueType": "string",
                        "value": "en-US"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ],
                "status": "Not Consented"
            },
            {
                "id": "MktPrefEmail",
                "version": "2",
                "agreementType": "MktPrefEmail",
                "name": "MktPrefEmail",
                "characteristic": [
                    {
                        "name": "mandatory",
                        "value": true/false
                    },
                    {
                        "name": "language",
                        "valueType": "string",
                        "value": "en-US"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ],
                "status": "Not Consented"
            },
            {
                "id": "MktPrefText",
                "version": "2",
                "agreementType": "MktPrefText",
                "name": "MktPrefText",
                "characteristic": [
                    {
                        "name": "mandatory",
                        "value": true/false
                    },
                    {
                        "name": "language",
                        "valueType": "string",
                        "value": "en-US"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ],
                "status": "Not Consented"
            },
            {
                "id": "MktPrefCall",
                "version": "2",
                "agreementType": "MktPrefCall",
                "name": "MktPrefCall",
                "characteristic": [
                    {
                        "name": "mandatory",
                        "value": true/false
                    },
                    {
                        "name": "language",
                        "valueType": "string",
                        "value": "en-US"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ],
                "status": "Not Consented"
            },
            {
                "id": "AutoPay",
                "version": "2",
                "agreementType": "AutoPay",
                "name": "AutoPay",
                "characteristic": [
                    {
                        "name": "paymentType",
                        "value": "NoneToAnyPM"
                    },
                    {
                        "name": "mandatory",
                        "value": true/false
                    },
                    {
                        "name": "language",
                        "valueType": "string",
                        "value": "en-US"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ],
                "status": "Not Consented"
            },
            {
                "id": "GeneralTnC",
                "version": "2",
                "agreementType": "GeneralTnC",
                "name": "GeneralTnC",
                "characteristic": [
                    {
                        "name": "mandatory",
                        "value": true/false
                    },
                    {
                        "name": "language",
                        "valueType": "string",
                        "value": "en-US"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ],
                "status": "Consented"
            },
            {
                "id": "BillingPrefEmail",
                "version": "2",
                "agreementType": "BillingPrefEmail",
                "name": "BillingPrefEmail",
                "characteristic": [
                    {
                        "name": "mandatory",
                        "value": true/false
                    },
                    {
                        "name": "language",
                        "valueType": "string",
                        "value": "en-US"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ],
                "status": "Not Consented"
            },
            {
                "id": "BillingPrefPostal",
                "version": "2",
                "agreementType": "BillingPrefPostal",
                "name": "BillingPrefPostal",
                "characteristic": [
                    {
                        "name": "mandatory",
                        "value": true/false
                    },
                    {
                        "name": "language",
                        "valueType": "string",
                        "value": "en-US"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ],
                "status": "Not Consented"
            },
            {
                "agreementType": "InsuranceConsent",
                "name": "InsuranceConsent",
                "characteristic": [
                    {
                        "name": "InsuranceConsent",
                        "valueType": "array",
                        "value": [
                            {
                                "id": "MSISDN 1",
                                "consentTextVersion": "2",
                                "state": "Consented/Not Consented"
                            },
                            {
                                "id": "MSISDN 2",
                                "consentTextVersion": "2",
                                "state": "Consented/Not Consented"
                            },
                            {
                                "id": "MSISDN 3",
                                "consentTextVersion": "2",
                                "state": "Consented/Not Consented"
                            }
                        ]
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ]
            },
            {
                "agreementType": "InstConsent",
                "name": "InstConsent",
                "characteristic": [
                    {
                        "name": "InstConsent",
                        "valueType": "array",
                        "value": [
                            {
                                "id": "MSISDN 2",
                                "consentTextVersion": "2",
                                "state": "Consented/Not Consented"
                            },
                            {
                                "id": "MSISDN 1",
                                "consentTextVersion": "2",
                                "state": "Consented/Not Consented"
                            }
                        ]
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ]
            },
            {
                "agreementType": "TradeInConsent",
                "name": "TradeInConsent",
                "characteristic": [
                    {
                        "id": "MSISDN 1",
                        "consentTextVersion": "2",
                        "state": "Consented/Not Consented"
                    },
                    {
                        "id": "MSISDN 2",
                        "mandatory": true/false,
                        "state": "Not Consented"
                    }
                ],
                "engagedParty": [
                    {
                        "id": "23636065-23637391",
                        "name": "accountNumber",
                        "referredType": "accountNumber"
                    },
                    {
                        "id": "80178000000yiS2AAI",
                        "name": "orderId",
                        "referredType": "orderId"
                    }
                ]
            }
        ]
    }
]'
Definitions

Each of the request parameters is detailed.

Note: For SYS layers it's necessary to define the elements

namevaluedescriptionrequired
payload[].opStringIs the action to take. The following operations are supported: Add, Remove, Replace, Copy,Move, TestY
payload[].pathStringis a pointer/reference to the field to change.Y
payload[].valueStringis the value to use,Y

Note: definition of the elements present in Value[] resources

nametypedescriptionrequired
idStringUnique template id of the consentY
versionStringConsent Text VersionN
statusStringcustomers action for status, allowed value "Consented", "Not Consented"Y
agreementTypeStringA categorization of an different types of consents related to an agreement, such as "General", "AutoPay", "BillingPref", "MarketingPref"Y
nameStringName of the consentY
characteristicarrayDescribes a given characteristic of an object or entity through a name/value pair.Y
characteristic.nameStringName of the characteristicY
characteristic.valueTypeStringData type of the value of the characteristicY
characteristic.valueanyThe value of the characteristicN
Response
[
    {
        "id": "MktPrefPostal",
        "version": "2",
        "agreementType": "MktPrefPostal",
        "name": "MktPrefPostal",
        "characteristic": [
            {
                "name": "mandatory",
                "value": true/false
            },
            {
                "name": "language",
                "valueType": "string",
                "value": "en-US"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ],
        "status": "Not Consented"
    },
    {
        "id": "MktPrefEmail",
        "version": "2",
        "agreementType": "MktPrefEmail",
        "name": "MktPrefEmail",
        "characteristic": [
            {
                "name": "mandatory",
                "value": true/false
            },
            {
                "name": "language",
                "valueType": "string",
                "value": "en-US"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ],
        "status": "Not Consented"
    },
    {
        "id": "MktPrefText",
        "version": "2",
        "agreementType": "MktPrefText",
        "name": "MktPrefText",
        "characteristic": [
            {
                "name": "mandatory",
                "value": true/false
            },
            {
                "name": "language",
                "valueType": "string",
                "value": "en-US"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ],
        "status": "Not Consented"
    },
    {
        "id": "MktPrefCall",
        "version": "2",
        "agreementType": "MktPrefCall",
        "name": "MktPrefCall",
        "characteristic": [
            {
                "name": "mandatory",
                "value": true/false
            },
            {
                "name": "language",
                "valueType": "string",
                "value": "en-US"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ],
        "status": "Not Consented"
    },
    {
        "id": "AutoPay",
        "version": "2",
        "agreementType": "AutoPay",
        "name": "AutoPay",
        "characteristic": [
            {
                "name": "paymentType",
                "value": "NoneToAnyPM"
            },
            {
                "name": "mandatory",
                "value": true/false
            },
            {
                "name": "language",
                "valueType": "string",
                "value": "en-US"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ],
        "status": "Not Consented"
    },
    {
        "id": "GeneralTnC",
        "version": "2",
        "agreementType": "GeneralTnC",
        "name": "GeneralTnC",
        "characteristic": [
            {
                "name": "mandatory",
                "value": true/false
            },
            {
                "name": "language",
                "valueType": "string",
                "value": "en-US"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ],
        "status": "Consented"
    },
    {
        "id": "BillingPrefEmail",
        "version": "2",
        "agreementType": "BillingPrefEmail",
        "name": "BillingPrefEmail",
        "characteristic": [
            {
                "name": "mandatory",
                "value": true/false
            },
            {
                "name": "language",
                "valueType": "string",
                "value": "en-US"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ],
        "status": "Not Consented"
    },
    {
        "id": "BillingPrefPostal",
        "version": "2",
        "agreementType": "BillingPrefPostal",
        "name": "BillingPrefPostal",
        "characteristic": [
            {
                "name": "mandatory",
                "value": true/false
            },
            {
                "name": "language",
                "valueType": "string",
                "value": "en-US"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ],
        "status": "Not Consented"
    },
    {
        "agreementType": "insuranceConsents",
        "name": "insuranceConsents",
        "characteristic": [
            {
                "name": "insuranceConsents",
                "valueType": "array",
                "value": [
                    {
                        "id": "MSISDN 1",
                        "consentTextVersion": "2",
                        "state": "Consented/Not Consented"
                    },
                    {
                        "id": "MSISDN 2",
                        "consentTextVersion": "2",
                        "state": "Consented/Not Consented"
                    },
                    {
                        "id": "MSISDN 3",
                        "consentTextVersion": "2",
                        "state": "Consented/Not Consented"
                    }
                ]
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ]
    },
    {
        "agreementType": "installmentConsents",
        "name": "installmentConsents",
        "characteristic": [
            {
                "name": "installmentConsents",
                "valueType": "array",
                "value": [
                    {
                        "id": "MSISDN 2",
                        "consentTextVersion": "2",
                        "state": "Consented/Not Consented"
                    },
                    {
                        "id": "MSISDN 1",
                        "consentTextVersion": "2",
                        "state": "Consented/Not Consented"
                    }
                ]
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ]
    },
    {
        "agreementType": "tradeInConsents",
        "name": "tradeInConsents",
        "characteristic": [
            {
                "id": "MSISDN 1",
                "consentTextVersion": "2",
                "state": "Consented/Not Consented"
            },
            {
                "id": "MSISDN 2",
                "mandatory": true/false,
                "state": "Not Consented"
            }
        ],
        "engagedParty": [
            {
                "id": "23636065-23637391",
                "name": "accountNumber",
                "referredType": "accountNumber"
            },
            {
                "id": "80178000000yiS2AAI",
                "name": "orderId",
                "referredType": "orderId"
            }
        ]
    }
]
Definitions

Each of the response parameters is detailed.

nametypedescriptionrequired
idStringUnique template id of the consentY
versionStringConsent Text VersionN
statusStringcustomers action for status, allowed value "Consented", "Not Consented"Y
agreementTypeStringA categorization of an different types of consents related to an agreement, such as "General", "AutoPay", "BillingPref", "MarketingPref"Y
nameStringName of the consentY
characteristicarrayDescribes a given characteristic of an object or entity through a name/value pair.Y
characteristic.nameStringName of the characteristicY
characteristic.valueTypeStringData type of the value of the characteristicY
characteristic.valueanyThe value of the characteristicN
Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400,
      "message" : "The request is invalid or not properly formed.",
      "description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
    }]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{
      "code" : 404,
      "message" : "The server could not find the requested resource.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method DELETE not allowed for : /{businessId}/agreement"
        }]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "Internal Server Error",
      "description": "The request failed due to an internal error"
    }]
}
[ 501 ]

Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

{
  "errors" : [{
      "code" : 501,
      "message" : "Not implemented",
      "description" : "Operation PATCH /agreement for Business Id: xxxx not implemented"
    }]
  }

Reviews